<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>

</head>
<body>
<div id="grand">1
	<div id="parent">2
		<div id="child">3</div>
			<div id="sibling">4</div>
		</div>
		<div id="parent1">5
			<div id="child1">6</div>
			<div id="sibling1">7</div>
		</div>
	</div>
	
	<script>
		// querySelector只获取单个元素 要加all 才能是全部元素
		var divs=document.querySelectorAll('div');
		var div3=document.querySelector('#child');
		var div2=div3.parentElement;
		var div4=div3.nextElementSibling;
		// var div4=div3.nextSibling;//Element 不加只获取节点 加了就是字号
		var div1=div3.parentElement.parentTextEdit;
		
		var div5=div3.parentElement.nextElementSibling;
		
		
		var div6=div5.firstElementChild;
		var div7=div5.lastElementChild;
		
		 console.log(div7);
		
		
		// console.log(div5);
		
		// console.log(divs);
		
		
		
		
		
	</script>
</body>
</html>
